home *** CD-ROM | disk | FTP | other *** search
- diff -u -r --new-file last-version/docs/Speed.txt samba-1.9.14p1/docs/Speed.txt
- --- last-version/docs/Speed.txt Mon Jul 3 18:37:33 1995
- +++ samba-1.9.14p1/docs/Speed.txt Sun Oct 22 12:21:48 1995
- @@ -101,6 +101,18 @@
- filesystems, but could be quite high even on local disks.
-
-
- +SHARE MODES
- +-----------
- +
- +Some people find that opening files is very slow. This is often
- +because of the "share modes" code needed to fully implement the dos
- +share modes stuff. You can disable this code using "share modes =
- +no". This will gain you a lot in opening and closing files but will
- +mean that (in some cases) the system won't force a second user of a
- +file to open the file read-only if the first has it open
- +read-write. For many applications that do their own locking this
- +doesn't matter, but for some it may.
- +
- LOG LEVEL
- ---------
-
- diff -u -r --new-file last-version/docs/Support.txt samba-1.9.14p1/docs/Support.txt
- --- last-version/docs/Support.txt Fri Jun 23 19:52:09 1995
- +++ samba-1.9.14p1/docs/Support.txt Mon Oct 30 17:30:07 1995
- @@ -188,3 +188,27 @@
- Samba experience: Linux, DEC ULTRIX <=> WFWG 3.11, Windows NT 3.5
- Specializing in World Wide Web related UNIX-to-PC connectivity.
- ------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +FORT COLLINS, CO - USA
- +
- +Granite Computing Solutions
- +ATTN: Brian Grossman
- +Box 270103
- +Fort Collins, CO 80527-0103
- +U.S.A.
- +(970) 225-2370
- +granite@fortnet.org
- +
- +Information services, including WfWG, NT, Apple <=> Unix interoperability.
- +
- +Our standard advertisement says:
- +
- +> Unix workstations, servers and custom systems <
- +>> WWW and Unix education <<
- +>>> Enterprise and departmental computing solutions <<<
- +>>> Backup & restore <<<
- +>> Software forensics <<
- +> Data translation <
- +------------------------------------------------------------------------------
- +
- diff -u -r --new-file last-version/source/change-log samba-1.9.14p1/source/change-log
- --- last-version/source/change-log Fri Sep 22 10:39:15 1995
- +++ samba-1.9.14p1/source/change-log Mon Oct 30 17:28:11 1995
- @@ -1589,7 +1589,25 @@
- - more japanese extensions patches from fujita@ainix.isac.co.jp
- - released alpha20
- - added force_user to conn struct
- -
- +
- +
- +2.0.0:
- + - removed bcast override from workgroup announce in nmbd
- + - aix patch, added NO_SYSMOUNTH, from
- + lionel leston <102624.346@compuserve.com>
- + - quick fix in lp_string() to try and stop some core dumps
- + - added uid cache in connections structure
- + to make user level security faster
- + - changed dos_mode() to show read-only on read-only shares only if
- + user w bit not set
- + - added check to stop exit_server() looping
- + - core dump fix in string_sub()
- + - fix client bug for long dirs in NT1 mode.
- + Thanks to Erwin Authried (erwin@ws1.atv.tuwien.ac.at)
- + - switched to a safer (but probably slower) readbraw implementation
- +
- +
- +
-
- ==========
- todo:
- diff -u -r --new-file last-version/source/client.c samba-1.9.14p1/source/client.c
- --- last-version/source/client.c Thu Sep 21 20:41:37 1995
- +++ samba-1.9.14p1/source/client.c Mon Oct 30 17:13:49 1995
- @@ -845,7 +845,8 @@
- {
- case 260:
- ff_resume_key =0;
- - strcpy(mask,p+ff_lastname+94);
- + StrnCpy(mask,p+ff_lastname,resp_data_len-ff_lastname);
- + /* strcpy(mask,p+ff_lastname+94); */
- break;
- case 1:
- strcpy(mask,p + ff_lastname + 1);
- diff -u -r --new-file last-version/source/fault.c samba-1.9.14p1/source/fault.c
- --- last-version/source/fault.c Sat Sep 2 17:44:08 1995
- +++ samba-1.9.14p1/source/fault.c Mon Oct 30 17:15:35 1995
- @@ -76,6 +76,7 @@
- void fault_setup(void (*fn)())
- {
- cont_fn = fn;
- +
- #ifdef SIGSEGV
- signal(SIGSEGV,SIGNAL_CAST sig_fault);
- #endif
- @@ -83,3 +84,6 @@
- signal(SIGBUS,SIGNAL_CAST sig_fault);
- #endif
- }
- +
- +
- +
- diff -u -r --new-file last-version/source/includes.h samba-1.9.14p1/source/includes.h
- --- last-version/source/includes.h Thu Sep 21 20:49:47 1995
- +++ samba-1.9.14p1/source/includes.h Sun Oct 22 13:39:14 1995
- @@ -57,6 +57,10 @@
- #define NO_UNISTDH
- #endif
-
- +#ifdef AIX
- +#define NO_SYSMOUNTH
- +#endif
- +
- #ifdef M88K_R3
- #define SVR3H
- #define NO_RESOURCEH
- diff -u -r --new-file last-version/source/loadparm.c samba-1.9.14p1/source/loadparm.c
- --- last-version/source/loadparm.c Sun Sep 17 09:53:17 1995
- +++ samba-1.9.14p1/source/loadparm.c Sun Oct 22 11:58:56 1995
- @@ -583,7 +583,11 @@
- ret = &bufs[next][0];
- next = (next+1)%10;
-
- - StrnCpy(ret,s,sizeof(pstring)-1);
- + if (!s)
- + *ret = 0;
- + else
- + StrnCpy(ret,s,sizeof(pstring)-1);
- +
- standard_sub_basic(ret);
- return(ret);
- }
- diff -u -r --new-file last-version/source/local.h samba-1.9.14p1/source/local.h
- --- last-version/source/local.h Thu Sep 14 10:32:52 1995
- +++ samba-1.9.14p1/source/local.h Sun Oct 22 13:51:03 1995
- @@ -105,6 +105,9 @@
- #define PAGER "more"
- #endif
-
- +/* the size of the uid cache used to reduce valid user checks */
- +#define UID_CACHE_SIZE 4
- +
- /* the following control timings of various actions. Don't change
- them unless you know what you are doing. These are all in seconds */
- #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
- diff -u -r --new-file last-version/source/nameserv.c samba-1.9.14p1/source/nameserv.c
- --- last-version/source/nameserv.c Tue Sep 12 15:57:11 1995
- +++ samba-1.9.14p1/source/nameserv.c Fri Sep 22 17:39:32 1995
- @@ -1464,7 +1464,7 @@
- if (names[i].valid) {
- if (names[i].name[0] == '*') {
- StrnCpy(names[i].name,group,15);
- - names[i].ip = names[i].master_ip = ip;
- + names[i].master_ip = ip;
- names[i].found_master = True;
- names[i].count=0;
- announce_host(i,myname,comment);
- @@ -1475,7 +1475,7 @@
- for (j=i;j<num_names;j++)
- if (names[j].valid && names[j].isgroup && names[i].found_master &&
- name_equal(names[i].name,group,0,0)) return;
- - names[i].ip = names[i].master_ip = ip;
- + names[i].master_ip = ip;
- names[i].found_master = True;
- names[i].count=0;
- announce_host(i,myname,comment);
- diff -u -r --new-file last-version/source/reply.c samba-1.9.14p1/source/reply.c
- --- last-version/source/reply.c Thu Sep 21 20:49:48 1995
- +++ samba-1.9.14p1/source/reply.c Mon Oct 30 17:31:07 1995
- @@ -1000,7 +1000,7 @@
- close_file(fnum);
- return(ERROR(ERRDOS,ERRnoaccess));
- }
- -
- +
- outsize = set_message(outbuf,15,0,True);
- CVAL(outbuf,smb_vwv0) = smb_com2;
- SSVAL(outbuf,smb_vwv1,(chain_size+outsize)-4);
- @@ -1157,6 +1157,8 @@
- struct stat sbuf;
- int fmode;
-
- + if (!CAN_WRITE(cnum)) return(False);
- +
- if (sys_lstat(fname,&sbuf) != 0) return(False);
- fmode = dos_mode(cnum,fname,&sbuf);
- if (fmode & aDIR) return(False);
- @@ -1264,7 +1266,6 @@
- int ret=0;
- int fd;
- char *fname;
- - int predict=0;
-
- cnum = SVAL(inbuf,smb_tid);
- fnum = GETFNUM(inbuf,smb_vwv0);
- @@ -1315,16 +1316,28 @@
- fnum,cnum,startpos,
- maxcount,mincount,nread));
-
- - _smb_setlen(header,nread);
- +#if UNSAFE_READRAW
- + {
- + int predict=0;
- + _smb_setlen(header,nread);
- +
- + if (!Files[fnum].can_write)
- + predict = read_predict(fd,startpos,header+4,NULL,nread);
-
- - if (!Files[fnum].can_write)
- - predict = read_predict(fd,startpos,header+4,NULL,nread);
- + if ((nread-predict) > 0)
- + seek_file(fnum,startpos + predict);
- +
- + ret = transfer_file(fd,Client,nread-predict,header,4+predict,
- + startpos+predict);
- + }
- +#else
- + ret = read_file(fnum,header+4,startpos,nread,nread,-1,False);
- + if (ret < mincount) ret = 0;
-
- - if ((nread-predict) > 0)
- - seek_file(fnum,startpos + predict);
- + _smb_setlen(header,ret);
- + transfer_file(0,Client,0,header,4+ret,0);
- +#endif
-
- - ret = transfer_file(fd,Client,nread-predict,header,4+predict,
- - startpos+predict);
-
- if (ret != nread+4)
- DEBUG(0,("ERROR: file read failure on %s at %d for %d bytes (%d)\n",
- @@ -2439,6 +2452,8 @@
- {
- struct stat sbuf;
- int fmode;
- +
- + if (!CAN_WRITE(cnum)) return(False);
-
- if (sys_lstat(fname,&sbuf) != 0) return(False);
- fmode = dos_mode(cnum,fname,&sbuf);
- diff -u -r --new-file last-version/source/server.c samba-1.9.14p1/source/server.c
- --- last-version/source/server.c Fri Sep 22 10:39:21 1995
- +++ samba-1.9.14p1/source/server.c Mon Oct 30 17:08:57 1995
- @@ -151,9 +151,18 @@
- {
- int result = 0;
-
- - if (!CAN_WRITE(cnum))
- +#if OLD_DOS_MODE
- + if (!CAN_WRITE(cnum) || !((sbuf->st_mode & S_IWOTH) ||
- + Connections[cnum].admin_user ||
- + ((sbuf->st_mode & S_IWUSR) &&
- + Connections[cnum].uid==sbuf->st_uid) ||
- + ((sbuf->st_mode & S_IWGRP) &&
- + in_group(sbuf->st_gid,Connections[cnum].gid,
- + Connections[cnum].ngroups,
- + Connections[cnum].igroups))))
- result |= aRONLY;
- - else
- +#else
- + if (CAN_WRITE(cnum)) {
- if (!((sbuf->st_mode & S_IWOTH) ||
- Connections[cnum].admin_user ||
- ((sbuf->st_mode & S_IWUSR) && Connections[cnum].uid==sbuf->st_uid) ||
- @@ -161,6 +170,11 @@
- in_group(sbuf->st_gid,Connections[cnum].gid,
- Connections[cnum].ngroups,Connections[cnum].igroups))))
- result |= aRONLY;
- + } else {
- + if ((sbuf->st_mode & S_IWUSR) == 0)
- + result |= aRONLY;
- + }
- +#endif
-
- if ((sbuf->st_mode & S_IXUSR) != 0)
- result |= aARCH;
- @@ -1224,7 +1238,7 @@
- }
-
- if (flags != O_RDONLY && file_existed &&
- - IS_DOS_READONLY(dos_mode(cnum,fname,&sbuf))) {
- + (!CAN_WRITE(cnum) || IS_DOS_READONLY(dos_mode(cnum,fname,&sbuf)))) {
- if (!fcbopen) {
- errno = EACCES;
- return;
- @@ -1578,6 +1592,26 @@
- return(ret);
- }
-
- +/*******************************************************************
- +check if a username is OK
- +********************************************************************/
- +static BOOL check_user_ok(int cnum,user_struct *vuser,int snum)
- +{
- + int i;
- + for (i=0;i<Connections[cnum].uid_cache.entries;i++)
- + if (Connections[cnum].uid_cache.list[i] == vuser->uid) return(True);
- +
- + if (!user_ok(vuser->name,snum)) return(False);
- +
- + i = Connections[cnum].uid_cache.entries % UID_CACHE_SIZE;
- + Connections[cnum].uid_cache.list[i] = vuser->uid;
- +
- + if (Connections[cnum].uid_cache.entries < UID_CACHE_SIZE)
- + Connections[cnum].uid_cache.entries++;
- +
- + return(True);
- +}
- +
-
- /****************************************************************************
- become the user of a connection number
- @@ -1599,7 +1633,7 @@
- if (Connections[cnum].force_user ||
- lp_security() == SEC_SHARE ||
- !(vuser = get_valid_user_struct(uid)) ||
- - !user_ok(vuser->name,snum)) {
- + !check_user_ok(cnum,vuser,snum)) {
- uid = Connections[cnum].uid;
- gid = Connections[cnum].gid;
- groups = Connections[cnum].groups;
- @@ -2364,6 +2398,7 @@
- }
-
- pcon = &Connections[cnum];
- + bzero((char *)pcon,sizeof(*pcon));
-
- /* find out some info about the user */
- pass = Get_Pwnam(user,True);
- @@ -2376,11 +2411,20 @@
-
- pcon->read_only = lp_readonly(snum);
-
- - if (user_in_list(user,lp_readlist(snum)))
- - pcon->read_only = True;
- + {
- + pstring list;
- + StrnCpy(list,lp_readlist(snum),sizeof(pstring)-1);
- + string_sub(list,"%S",service);
- +
- + if (user_in_list(user,list))
- + pcon->read_only = True;
- +
- + StrnCpy(list,lp_writelist(snum),sizeof(pstring)-1);
- + string_sub(list,"%S",service);
-
- - if (user_in_list(user,lp_writelist(snum)))
- - pcon->read_only = False;
- + if (user_in_list(user,list))
- + pcon->read_only = False;
- + }
-
- /* admin user check */
- if (user_in_list(user,lp_admin_users(snum)) &&
- @@ -3171,6 +3215,8 @@
- chown(dname,getuid(),getgid());
- chmod(dname,0700);
- if (chdir(dname)) return(False);
- + umask(~(0700));
- +
- #ifndef NO_GETRLIMIT
- #ifdef RLIMIT_CORE
- {
- @@ -3179,11 +3225,12 @@
- rlp.rlim_cur = MAX(4*1024*1024,rlp.rlim_cur);
- setrlimit(RLIMIT_CORE, &rlp);
- getrlimit(RLIMIT_CORE, &rlp);
- - DEBUG(0,("Core limits now %d %d\n",rlp.rlim_cur,rlp.rlim_max));
- + DEBUG(3,("Core limits now %d %d\n",rlp.rlim_cur,rlp.rlim_max));
- }
- #endif
- #endif
- - umask(~(0700));
- +
- +
- DEBUG(0,("Dumping core in %s\n",dname));
- return(True);
- }
- @@ -3194,7 +3241,12 @@
- ****************************************************************************/
- void exit_server(char *reason)
- {
- + static int firsttime=1;
- int i;
- +
- + if (!firsttime) exit(0);
- + firsttime = 0;
- +
- if (done_become_user != -1)
- unbecome_user();
- DEBUG(1,("Closing connections\n"));
- @@ -3715,7 +3767,7 @@
-
- /* check for socket failure */
- if (errno == EBADF) {
- - DEBUG(2,("%s Bad file descriptor - exiting\n",timestring()));
- + DEBUG(3,("%s Bad file descriptor - exiting\n",timestring()));
- return;
- }
-
- diff -u -r --new-file last-version/source/smb.h samba-1.9.14p1/source/smb.h
- --- last-version/source/smb.h Fri Sep 22 10:35:42 1995
- +++ samba-1.9.14p1/source/smb.h Sun Oct 22 13:49:05 1995
- @@ -248,12 +248,19 @@
- char *name;
- } files_struct;
-
- +
- +struct uid_cache {
- + int entries;
- + int list[UID_CACHE_SIZE];
- +};
- +
- typedef struct
- {
- int service;
- BOOL force_user;
- int uid; /* uid of user who *opened* this connection */
- int gid; /* gid of user who *opened* this connection */
- + struct uid_cache uid_cache;
- void *dirptr;
- BOOL open;
- BOOL printer;
- diff -u -r --new-file last-version/source/util.c samba-1.9.14p1/source/util.c
- --- last-version/source/util.c Thu Sep 21 21:05:13 1995
- +++ samba-1.9.14p1/source/util.c Mon Oct 23 20:19:33 1995
- @@ -2632,9 +2632,13 @@
- {
- BOOL ret = False;
- char *p;
- - int ls = strlen(s);
- - int lp = strlen(pattern);
- - int li = strlen(insert);
- + int ls,lp,li;
- +
- + if (!insert || !pattern || !s) return(False);
- +
- + ls = strlen(s);
- + lp = strlen(pattern);
- + li = strlen(insert);
-
- if (!*pattern) return(False);
-
- diff -u -r --new-file last-version/source/version.h samba-1.9.14p1/source/version.h
- --- last-version/source/version.h Fri Sep 22 10:40:47 1995
- +++ samba-1.9.14p1/source/version.h Mon Oct 30 17:32:32 1995
- @@ -1 +1 @@
- -#define VERSION "1.9.14"
- +#define VERSION "1.9.14p1"
-